<?php
/**
 * Created by PhpStrom
 * User: 郭碧云
 * Date: 2021/6/21 10:01
 * Desc:
 */

namespace App\Lib\DataTag;

use App\Service\OrgService;

class OrgDataTag extends BaseDataTag
{
    //获取列表数据
    public function getData($where=[]){
        $data = (new OrgService())->getOrgData($where,["id", "name", "parent_id","code"]);
        //字段处理
        foreach ($data as $key => $d) {
            $data[$key]["name"]="[".$d["id"]."] ".$d["name"];
        }
        return $data;
    }
}
